<template>
  <div>
    <van-nav-bar
  title="商品详情"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
<img :src="goodsData2.data[0].thumb_url" alt="">
    <h3>{{ goodsData2.data[0].goods_name }}</h3>
    <h5><span>【{{ goodsData2.data[0].sales_tip }}】</span>{{ goodsData2.data[0].short_name }}</h5>
    <div class="price"><span>￥{{ goodsData2.data[0].price }}</span></div>

  </div>
</template>

<script>
export default {
  created () {
    this.goodsData2 = JSON.parse(this.$route.query.goodsData)
    // console.log(this.goodsData)
  },
  data () {
    return {
      goodsData2: []
    }
  },
  methods: {
    onClickLeft () {
      this.$router.push('/mother')
    }
  }
}
</script>

<style scoped>
.van-nav-bar{
  width: 100%;;
  border-bottom: 1px solid grey;
  position: fixed;
  top: 0;
}
h1{
  margin-top: 50px;
  text-align: center;
}
img{
  width: 335px;
  height: 335px;
  margin-top: 60px;;;;
  margin-left: 20px;;
}
span{
  color: red;
}
</style>
